<?php

namespace app\common\model;


class MallSpecs extends Base
{

    protected $name = "mall_specs";

    protected $deleteTime = "delete_time";


    public function getStatusList()
    {
        return ['0' => '禁用', '1' => '启用',];
    }

    /**
     * 根据id查询所有规格
     * @param array $ids
     * @param string $field
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function getSpecsByIdsValue(array $ids = [], string $field = '*'): array
    {
        return $this->field($field)
            ->where('id', 'in', $ids)
            ->select()->toArray();
    }


}